
/* _____________________________________________________________________________

* 	Paper: Perspective-Taking Through Partisan Eyes
* 	Replication File - Read Me
* 	Date: 2022
* 	Authors: Donald Casler and Dylan Groves, dylanwgroves@gmail.com
________________________________________________________________________________*/


*log using "", replace

/* Introduction ________________________________________________________________*/
	
	clear all
	set maxvar 30000
	set more off
	set seed 1956
	set version 16

	
/* Set Global ___________________________________________________________________*/

	** SET YOUR OWN GLOBAL
	gl stata "X:\Dropbox\Paper - PTinIR\09 Code\07_Replication\"

	
/* Import Data _________________________________________________________________*/

	use "$stata\ptinir_pooled.dta", clear

	
/*  Set Treat Variables ________________________________________________________*/
	
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t


/* _____________________________________________________________________________

	Table 1: Perspective Taking Cues and Support for Int’l Cooperation

________________________________________________________________________________*/

	**** Main Effects
	
	* Primary
	
	* Primary Regression (Column 1)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	reg dv_coop treat treat_topic i.wave [pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2

	
	* Controls (Column 2)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2

	
	* Country 
	
	* China (Column 3)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	keep if treat_c == 2 | treat_c == 0
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars'[pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* India (Column 4)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t

	sort resp_uid
	set seed 1958
	
	keep if treat_c == 1 | treat_c == 0
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars'[pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Column 3.5 interaction 
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
		gen interact_india = .
		replace interact_india = 1 if treat_c == 1 
		replace interact_india = 0 if treat_c == 2
		
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop interact_india treat_topic i.wave `lassovars'  [pweight = ipw]
	
	
	* Topic
	
	* Security (Column 5)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	keep if treat_t == 1
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat i.wave `lassovars'[pweight = ipw] 
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Climate (Column 6)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t

	sort resp_uid
	set seed 1958

	keep if treat_t == 0
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat i.wave `lassovars'[pweight = ipw] 
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Interact Effect (Column 5.5)
	use "$stata\ptinir_pooled.dta", clear
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	recode treat_t (0 = 1)(1 = 0), gen(treat_climate)
	gen interact_topic = treat * treat_climate

	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			global l_nk_int = e(k_nonzero_sel)
	local lassovars = e(allvars_sel)
	reg dv_coop interact_topic treat treat_climate i.wave `lassovars'[pweight = ipw]
	

/* _____________________________________________________________________________

	Table 2: Manipulation Checks, by Treatment Sub-Components

________________________________________________________________________________*/

	
/* Import Data _________________________________________________________________*/

	use "$stata\ptinir_pooled.dta", clear
	keep if wave == 3

/* Tables 2 Regressions ________________________________________________________*/

	* Support Treat (Column 1) 
	reg dv_coop i.treat // Note that p-values for PT treatmetn are one-tailed positive
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}

	* India Coop (Column 2)
	reg manip_india i.treat // Note that p-values for PT treatmetn are one-tailed
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}
			
	* Thermo (Column 3)
	reg manip_thermo i.treat // Note that p-values for PT treatmetn are one-tailed
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}
	* Thermo (Column 4)
	reg manip_attention i.treat // Note that p-values for PT treatmetn are one-tailed
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}
			
	* Thermo (Column 5)
	reg manip_ee i.treat // Note that p-values for PT treatmetn are one-tailed
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}
			
	* Thermo (Column 6)
	reg manip_ce i.treat // Note that p-values for PT treatmetn are one-tailed
		matrix table = r(table)
		matrix list table

			global coef_pt 		= table[1,2]    	//beta
			global coef_ee 		= table[1,3]    	//beta
			global coef_think 	= table[1,4]  //beta
			global coef_us 		= table[1,5]    	//beta
			
			global pval_pt 		= table[4,2]		//pval
			global pval_ee 		= table[4,3]		//pval
			global pval_think 	= table[4,4]		//pval
			global pval_us 		= table[4,5]		//pval
			
			foreach type in pt ee think us {
				if ${coef_`type'} > 0 {
					global pval_`type' = ${pval_`type'}/2 
				}
				
				if ${coef_`type'} < 0 { 
					global pval_`type' = 1-${pval_`type'}/2 
				}
				
				di "One-sided p-value `type' is ${pval_`type'}"
			}
	
	
/* _____________________________________________________________________________

	Table A2: Covariate Balance, Waves 1-2
	
________________________________________________________________________________*/


	/* Import Data _____________________________________________________________*/

	use "$stata\ptinir_pooled.dta", clear
	keep if wave != 3

	/* Panel A: Wave 1 + 2 _____________________________________________________*/

	* Politics
	gen c_democrat = 1 if c_pid == 3
	replace c_democrat = 0 if c_pid == 1 | c_pid == 2 

	gen c_ind = 1 if c_pid == 2
	replace c_ind = 0 if c_pid == 1 | c_pid == 3 

	gen c_rep = 1 if c_pid == 1
	replace c_rep = 0 if c_pid == 3 | c_pid == 2

	gen c_female = 1 if c_male == 0
	replace c_female = 0 if c_male == 1

	* Education
	gen c_highschool = 1 if c_edu == 1 | c_edu == 2
	replace c_highschool = 0 if c_highschool == .

	gen c_college = 1 if c_edu == 3 | c_edu == 4
	replace c_college = 0 if c_college == .

	gen c_postgrad = 1 if c_edu == 5 | c_edu == 6
	replace c_postgrad = 0 if c_postgrad == .

	* Age
	egen age_sb = cut(c_age), group(5) label
	tab age_sb, generate(s)

	destring c_ideology, replace

	#d ;
	local dvs		c_age
					c_highschool
					c_college
					c_postgrad
					c_white
					c_black
					c_latino
					c_female
					c_democrat
					c_ind
					c_rep
					c_attention
					c_ideology
					; 
	#d cr

		** Regression
		drop treat 
		rename treat_pt treat
		foreach dv of local dvs  {

			qui reg `dv' treat i.wave

			* Control Mean
			sum `dv' if treat == 0

			* Treatment Mean
			sum `dv' if treat == 1
		}
		
	/* Panel B: Wave 1 _________________________________________________________*/

	use "$stata\ptinir_pooled.dta", clear
	keep if wave != 3
		drop treat 
		rename treat_pt treat
		
		* Income
		gen c_50 = 1 if c_income == 1
		replace c_50 = 0 if c_income != 1

		gen c_75 = 1 if c_income == 2
		replace c_75 = 0 if c_income != 2

		gen c_100 = 1 if c_income == 3
		replace c_100 = 0 if c_income != 3

		gen c_interventionist_dum = 1 if c_interventionist == 3 | c_interventionist == 4
		replace c_interventionist_dum = 0 if c_interventionist == 1 | c_interventionist == 2

		#d ;
		local dvs		c_50
						c_75
						c_100
						c_interventionist_dum
						c_trust
						c_pt_index ; 
		#d cr

		** Regression
		
		foreach dv of local dvs  {

			reg `dv' treat i.wave

			* Control Mean
			sum `dv' if treat == 0

			* Treatment Mean
			sum `dv' if treat == 1
		}
		
	/* Panel C: Wave 2 _________________________________________________________*/
	
	use "$stata\ptinir_pooled.dta", clear
	keep if wave != 3
		drop treat 
		rename treat_pt treat
		
	* Attention
	
			reg c_attention treat i.wave

			sum c_attention if treat == 0
			sum c_attention if treat == 1
			
			
	* Ideology
	
			reg c_ideology treat i.wave
			
			sum c_ideology if treat == 0
			sum c_ideology if treat == 1
		
		
/* _____________________________________________________________________________

	Table A3: Covariate Balance, Wave 3
	
________________________________________________________________________________*/
	

	** Import Data	
	use "$stata\ptinir_pooled.dta", clear
	keep if wave == 3	
	gen c_female = (c_gender == 3)
	
	** Set Variables 
	#d ;
	global dv_vars		
							c_female
							c_education 
							c_attention 
							c_pid 
							c_ideology 
							c_fpmil_index 
							c_fpcoop_index 
							c_pt_index 
							c_ce_index 
							c_ee_index 
							;
	#d cr

	** Run regressions
	foreach dv of global dv_vars  {
		
		/* variable */
		global dv `dv'

		/* Control mean */
		sum ${dv} if treat == 0 

		/* Treat mean */
		sum ${dv} if treat == 1 
			
		sum ${dv} if treat == 2 
			
		sum ${dv} if treat == 3 
			
		sum ${dv} if treat == 4 
		
		reg ${dv} i.treat	
		testparm i.treat

	}
	
	
	
	
/* _____________________________________________________________________________

	Table A4: Demographic Profile Across Survey Waves
	
________________________________________________________________________________*/	
	

	** Set variables
	#d ;
	global dv_vars		
							c_gender 
							c_education 
							c_attention 
							c_pid 
							c_ideology 
							c_fpmil_index 
							c_fpcoop_index 
							c_pt_index 
							c_ce_index 
							c_ee_index 
							;
	#d cr

	** Wave 3, Prolific
	use "$stata\ptinir_pooled.dta", clear
	keep if wave == 3

	recode c_gender (1 2 = 0)(3 = 1), gen(c_female) // create "female" dummy variable
	
	* Education
	gen c_edu_lesscol = (c_education == 0 | c_education == 1 | c_education == 2) // create "less than college" dummy variable
	
	gen c_edu_col = (c_education == 3) // create "attended college" dummy variable
	
	gen c_edu_morecol = (c_education == 4 | c_education == 5) // create "attended more than college" dummy variable
	
	* Party ID // create dummy variables for each party id
	drop c_dem
	gen c_dem = (c_pid == 3)
	gen c_ind = (c_pid == 2)
	gen c_gop = (c_pid == 1)

		* Prolific
		sum c_female 
		sum c_age 
		sum c_edu_lesscol 	
		sum c_edu_col 
		sum c_edu_lesscol 
		sum c_gop
		sum c_ind
		sum c_dem 
		
	** Wave 1: MTurk
	use "$stata\ptinir_pooled.dta", clear
	keep if wave == 1


		recode c_male (0=1)(1=0), gen(c_female)
		
		* edu
		gen c_edu_lesscol = (c_edu == 1 | c_edu == 2 | c_edu == 3)
		
		gen c_edu_col = (c_edu == 4)
		
		gen c_edu_morecol = (c_edu == 5 | c_edu == 6)
		
		* Party ID
		drop c_dem
		gen c_dem = (c_pid == 3)
		gen c_ind = (c_pid == 2)
		gen c_gop = (c_pid == 1)

			sum c_female 
			sum c_age 
			sum c_edu_lesscol 
			sum c_edu_col 
			sum c_edu_lesscol 
			sum c_gop
			sum c_ind
			sum c_dem 
			
		
	** Wave 2: Lucid
	use "$stata\ptinir_pooled.dta", clear
	keep if wave == 2
	drop c_dem 
		
		recode c_male (0=1)(1=0), gen(c_female)
		
		* edu
		gen c_edu_lesscol = (c_edu == 1 | c_edu == 2 | c_edu == 3)
		
		gen c_edu_col = (c_edu == 4)
		
		gen c_edu_morecol = (c_edu == 5 | c_edu == 6)
		
		* Party ID
		gen c_dem = (c_pid == 3)
		gen c_ind = (c_pid == 2)
		gen c_gop = (c_pid == 1)
		
			sum c_female 
			sum c_age 	
			sum c_edu_lesscol 		
			sum c_edu_col 	
			sum c_edu_lesscol 	
			sum c_gop
			sum c_ind
			sum c_dem
	
	
	
/* _____________________________________________________________________________

	Table A6: Wave 1-2 Results, Attention Check Filters

________________________________________________________________________________*/



	**** Main Effects
	
	* Primary
	
	* Primary Regression (Column 1)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	reg dv_coop treat treat_topic i.wave [pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2

	
	* Controls (Column 2)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
		test _b[treat]=0
		di "One-sided p-value" r(p)/2

	
	* Country 
	
	* China (Column 3)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars'[pweight = ipw] if treat_c == 2 | treat_c == 0
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* India (Column 4)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat treat_topic i.wave `lassovars'[pweight = ipw] if treat_c == 1 | treat_c == 0
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Column 3.5 interaction 
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
		gen interact_india = .
		replace interact_india = 1 if treat_c == 1 
		replace interact_india = 0 if treat_c == 2
		
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop interact_india treat_topic i.wave `lassovars'  [pweight = ipw]
	
	
	* Topic
	
	* Security (Column 5)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	sort resp_uid
	set seed 1958
	
	keep if treat_t == 1
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat i.wave `lassovars'[pweight = ipw] 
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Climate (Column 6)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t

	sort resp_uid
	set seed 1958

	keep if treat_t == 0
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
	local lassovars = e(allvars_sel)
	reg dv_coop treat i.wave `lassovars'[pweight = ipw] 
		test _b[treat]=0
		di "One-sided p-value" r(p)/2
	
	* Interact Effect (Column 5.5)
	use "$stata\ptinir_pooled.dta", clear
	keep if manip_check == 1
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	
	recode treat_t (0 = 1)(1 = 0), gen(treat_climate)
	gen interact_topic = treat * treat_climate

	sort resp_uid
	set seed 1958
	
	qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			global l_nk_int = e(k_nonzero_sel)
	local lassovars = e(allvars_sel)
	reg dv_coop interact_topic treat treat_climate i.wave `lassovars'[pweight = ipw]
	

	
	
	
/* _____________________________________________________________________________

	Table 7: Wave 3 Results, Attention Check Filters

________________________________________________________________________________*/

	/* Import Data _________________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear
		keep if wave == 3

	/* Manipulation Checks _________________________________________________________*/

		drop if check1_captcha == 0
		drop if check2_swim == 0 

	/* Regressions ________________________________________________________*/

		* Support Treat (Column 1) 
		reg dv_coop i.treat // Note that PT p-values are one-tailed
		
		* India Coop (Column 2)
		reg manip_india i.treat // Note that PT p-values are one-tailed
		
		* Thermo (Column 3)
		reg manip_thermo i.treat  // Note that PT p-values are one-tailed
		
		* Thermo (Column 4)
		reg manip_attention i.treat // Note that PT p-values are one-tailed
		
		* Thermo (Column 5)
		reg manip_ee i.treat // Note that PT p-values are one-tailed
		
		* Thermo (Column 6)
		reg manip_ce i.treat // Note that PT p-values are one-tailed
		
		
/* _____________________________________________________________________________

	Table A8: Main Results Robustness, Covariates

________________________________________________________________________________*/	
	
	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear

		
	/*  Set Treat Variables ________________________________________________________*/
		
		drop treat
		gen treat = treat_pt
		gen treat_topic = treat_t

	/* Regressions ________________________________________________________*/

		**** Main Effects
		
		* Primary Regression
		reg dv_coop treat [pweight = ipw]
			test _b[treat]=0
			di "One-sided p-value" r(p)/2
		
		* Survey Wave 
		reg dv_coop treat i.wave [pweight = ipw]
			test _b[treat]=0
			di "One-sided p-value" r(p)/2
			
		* Treaty Topic (Column 3)
		reg dv_coop treat i.wave treat_t [pweight = ipw]
			test _b[treat]=0
			di "One-sided p-value" r(p)/2
			
		* Partisanship (Column 4)
		reg dv_coop treat i.wave treat_t i.c_pid [pweight = ipw]
			test _b[treat]=0
			di "One-sided p-value" r(p)/2
			
		* Demography (Column 5)
		reg dv_coop treat i.wave treat_t i.c_pid c_age c_edu c_male [pweight = ipw]
			test _b[treat]=0
			di "One-sided p-value" r(p)/2	

/* _____________________________________________________________________________

	Table A9: Waves 1-2 Results by Party Identification

________________________________________________________________________________*/	

	/* Regressions ________________________________________________________*/

		** Column 1: Democrat	
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 3
		
			* No Controls
			reg dv_coop treat treat_topic i.wave [pweight = ipw]  
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
			
		** Column 2: Democrat with Controls
			use "$stata\ptinir_pooled.dta", clear
				drop treat
				gen treat = treat_pt
				gen treat_topic = treat_t
				
				sort resp_uid
				set seed 1958
				
				keep if c_pid == 3
			
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_d_c = e(k_nonzero_sel)	
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
				
		** Column 3: Independent 
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 2

			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
		** Column 4: Independents with Controls
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 2
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
				local lassovars = e(allvars_sel)	
				global l_i_c = e(k_nonzero_sel)										
			
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
				
		** Column 3.b Independent Interaction 
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_ind = 1 if c_pid == 2
			replace c_ind = 0 if c_pid == 3
			gen interact_ind = treat*c_ind
		
			reg dv_coop interact_ind treat c_ind treat_topic i.wave [pweight = ipw]
				test _b[interact_ind]=0
				di "One-sided p-value" r(p)/2
				
		** Column 4.b Independent Interaction with Controls
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_ind = 1 if c_pid == 2
			replace c_ind = 0 if c_pid == 3
			gen interact_ind = treat*c_ind
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_i_int_c = e(k_nonzero_sel)	
					
			reg dv_coop interact_ind treat c_ind 	treat_topic i.wave `lassovars' [pweight = ipw]
					test _b[interact_ind]=0
					di "One-sided p-value" r(p)/2

		** Column 5: Republicans 
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 1

			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
		** Column 6: Republicans with Controls
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 1
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
				local lassovars = e(allvars_sel)	
				global l_i_c = e(k_nonzero_sel)										
			
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
				
		** Column 5.b Republican Interaction 
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_rep = .
			replace c_rep = 1 if c_pid == 1
			replace c_rep = 0 if c_pid == 3
			gen interact_rep = treat*c_rep
		
			reg dv_coop interact_rep treat c_rep treat_topic i.wave [pweight = ipw]
				test _b[interact_rep]=0
				di "One-sided p-value" r(p)/2
				
		** Column 6.b Republican Interaction with Controls
		use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_rep = .
			replace c_rep = 1 if c_pid == 1
			replace c_rep = 0 if c_pid == 3
			gen interact_rep = treat*c_rep	
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_i_int_c = e(k_nonzero_sel)	
					
			reg dv_coop interact_rep treat c_rep treat_topic i.wave `lassovars' [pweight = ipw]
					test _b[interact_rep]=0
					di "One-sided p-value" r(p)/2		
			
/* _____________________________________________________________________________

	Table A10: Waves 1-2 Party Identification Robustness, Attention Check

________________________________________________________________________________*/	

	
		/* Regressions ________________________________________________________*/

		** Column 1: Democrat	
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 3
		
			* No Controls
			reg dv_coop treat treat_topic i.wave [pweight = ipw]  
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
			
		** Column 2: Democrat with Controls
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 3
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_d_c = e(k_nonzero_sel)	
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
				
		** Column 3: Independent 
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 2

			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
		** Column 4: Independents with Controls
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 2
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
				local lassovars = e(allvars_sel)	
				global l_i_c = e(k_nonzero_sel)										
			
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
				
		** Column 3.b Independent Interaction 
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_ind = 1 if c_pid == 2
			replace c_ind = 0 if c_pid == 3
			gen interact_ind = treat*c_ind
		
			reg dv_coop interact_ind treat c_ind treat_topic i.wave [pweight = ipw]
				test _b[interact_ind]=0
				di "One-sided p-value" r(p)/2
				
		** Column 4.b Independent Interaction with Controls
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_ind = 1 if c_pid == 2
			replace c_ind = 0 if c_pid == 3
			gen interact_ind = treat*c_ind
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_i_int_c = e(k_nonzero_sel)	
					
			reg dv_coop interact_ind treat c_ind 	treat_topic i.wave `lassovars' [pweight = ipw]
					test _b[interact_ind]=0
					di "One-sided p-value" r(p)/2

		** Column 5: Republicans 
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 1

			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
		** Column 6: Republicans with Controls
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			keep if c_pid == 1
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
				local lassovars = e(allvars_sel)	
				global l_i_c = e(k_nonzero_sel)										
			
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
				test _b[treat]=0
				di "One-sided p-value" r(p)/2
				
				
		** Column 5.b Republican Interaction 
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_rep = .
			replace c_rep = 1 if c_pid == 1
			replace c_rep = 0 if c_pid == 3
			gen interact_rep = treat*c_rep
		
			reg dv_coop interact_rep treat c_rep treat_topic i.wave [pweight = ipw]
				test _b[interact_rep]=0
				di "One-sided p-value" r(p)/2
				
		** Column 6.b Republican Interaction with Controls
		use "$stata\ptinir_pooled.dta", clear
			keep if manip_check == 1
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			
			sort resp_uid
			set seed 1958
			
			gen c_rep = .
			replace c_rep = 1 if c_pid == 1
			replace c_rep = 0 if c_pid == 3
			gen interact_rep = treat*c_rep	
		
			qui lasso linear dv_coop c_age c_male i.c_pid_long c_edu c_white c_latino
					local lassovars = e(allvars_sel)	
					global l_i_int_c = e(k_nonzero_sel)	
					
			reg dv_coop interact_rep treat c_rep treat_topic i.wave `lassovars' [pweight = ipw]
					test _b[interact_rep]=0
					di "One-sided p-value" r(p)/2			

				
/* _____________________________________________________________________________

	Table A11: Waves 1-2 Results by Strength of Party Identification

________________________________________________________________________________*/	

	
	/* Regressions _____________________________________________________________*/
	
	*** Strong Democrat
		
			* No Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 5 
			
			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
			
			* Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 5 
			
			qui lasso linear dv_coop c_age c_male c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw] 
				test _b[treat]=0
				di "One-sided p-value" 1-r(p)
			
		*** Democrat
			
			* No Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 4
			
			reg dv_coop treat treat_topic i.wave [pweight = ipw]
					test _b[treat]=0
					di "One-sided p-value" r(p)/2	
			
			* Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 4
			
			qui lasso linear dv_coop c_age c_male c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw]
					test _b[treat]=0
					di "One-sided p-value" r(p)/2	
			
		*** Independent
			
			* No Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 3
			
			reg dv_coop treat treat_topic i.wave [pweight = ipw]
			
			* Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 3
			
			qui lasso linear dv_coop c_age c_male c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw] 
					test _b[treat]=0
					di "One-sided p-value" r(p)/2
					
		*** Republican
		
			* No Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 2
			
			reg dv_coop treat treat_topic i.wave [pweight = ipw] 
					test _b[treat]=0
					di "One-sided p-value" r(p)/2
			
			* Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 2
			
			qui lasso linear dv_coop c_age c_male c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			reg dv_coop treat treat_topic i.wave [pweight = ipw] // No lasso vars selected

					test _b[treat]=0
					di "One-sided p-value" r(p)/2
			
	*** Strong Republican
		
			* No Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 1
			
			reg dv_coop treat treat_topic i.wave [pweight = ipw] if c_pid_long == 1 
					test _b[treat]=0
					di "One-sided p-value" r(p)/2
			
			* Controls
			use "$stata\ptinir_pooled.dta", clear
			drop treat
			gen treat = treat_pt
			gen treat_topic = treat_t
			

			sort resp_uid
			set seed 1958
			
			keep if c_pid_long == 1
			
			qui lasso linear dv_coop c_age c_male c_edu c_white c_latino
			local lassovars = e(allvars_sel)
			reg dv_coop treat treat_topic i.wave `lassovars' [pweight = ipw] if c_pid_long == 1
					test _b[treat]=0
					di "One-sided p-value" r(p)/2
			
			
			
				
			
/* _____________________________________________________________________________

	Table A12: Wave 3 Results, by Party Identification

________________________________________________________________________________*/


	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear
		keep if wave == 3	
		
	/* Regressions _____________________________________________________________*/
	
	* Support Treat (Column 1) 
	reg dv_coop i.treat

	* Republicans (Column 2)
	reg dv_coop i.treat if c_pid == 1
	
	* Independents (Column 3)
	reg dv_coop i.treat if c_pid == 2
	
	* Republicans (Column 4)
	reg dv_coop i.treat if c_pid == 3
	
	
	
/* _____________________________________________________________________________

	Table A13: Political Attention By Party ID

________________________________________________________________________________*/	


	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear
		

	** Set Treatment Vars ----------------------------------------------------------
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
	gen dv_condition_dum = 1 if dv_condition == 1

	gen dv_coop_dum_neg = 1 if dv_coop_dum == 0
		replace dv_coop_dum_neg = 0 if dv_coop_dum == 1

	* Turn manipulation check on or off
	keep if manip_check == 1

	* Summarize variables
	foreach j of numlist 0/4 {

		gen attention_`j' = (c_attention == `j')
			replace attention_`j' = . if c_attention == .
			
		tab attention_`j' if c_attention == `j'
			
	foreach i of numlist 1/5 {

		sum attention_`j' if c_pid_long == `i' 

	}
	}


/* _____________________________________________________________________________

	Table A14: Correlates of Party ID

________________________________________________________________________________*/	

	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear
		
	/* Make Table ______________________________________________________________*/

	** Rows 1-2
	foreach i of numlist 1/5 {

		sum dv_coop if c_pid_long == `i' & treat == 0 
			
		sum dv_coop_dum if c_pid_long == `i' & treat == 0 
	}
	
	** Rows 3-4
	foreach i of numlist 1/5 {
	
		sum ce_wouldcoop if c_pid_long == `i'
		
		sum manip_india if c_pid_long == `i' 
	}
	
	** Row 5
	foreach i of numlist 1/5 {
	
		sum c_ideology if c_pid_long == `i'
		
	}
	
	** Row 6-7
	foreach i of numlist 1/5 {
	
		sum c_fpmil_index if c_pid_long == `i'
			
		sum c_fpcoop_index if c_pid_long == `i'
		
	}
	
	** Row 8-10
	foreach i of numlist 1/5 {
	
		sum c_pt_index if c_pid_long == `i'

		sum c_ce_index if c_pid_long == `i'
			
		sum c_ee_index if c_pid_long == `i'
		
	}
	
	** Row 11
	foreach i of numlist 1/5 {
	
		sum svy_duration if c_pid_long == `i'
		
	}


/* _____________________________________________________________________________

	Table A15: Support for International Cooperation (1-5), by beliefs about whether
other country will/should ratify the treaty

________________________________________________________________________________*/	


	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear
			
		drop treat
		gen treat = treat_pt
		
	/* Make Table ______________________________________________________________*/

	* Accept/Reject if other leader
	foreach i of numlist 1/5 {

		sum dv_coop if ce_wouldcoop == 1
			
		sum dv_coop if ce_wouldcoop == 0
			
		sum dv_coop if manip_india == 1
			
		sum dv_coop if manip_india == 0
	}
	
	* Think other leader will accept/reject
	foreach i of numlist 1/5 {
	
		sum dv_coop if c_pid_long == `i' & ce_wouldcoop == 1
			
		sum dv_coop if c_pid_long == `i' & ce_wouldcoop == 0
			
		sum dv_coop if c_pid_long == `i' & manip_india == 1
			
		sum dv_coop if c_pid_long == `i' & manip_india == 0
		
	}

	
/* _____________________________________________________________________________

	Table A16: Heterogeneous Effects By Malleability

________________________________________________________________________________*/	


	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear	
		
		destring c_ideology, replace
		
	
	/* Regression Tables _______________________________________________________*/

	** Set Treatment Vars 
	drop treat
	gen treat = treat_pt
	gen treat_topic = treat_t
		replace treat_topic = 0 if treat_topic == .

	/* Cleaning ________________________________________________________________*/

	gen c_pid_extreme = 1 if c_pid_long == 3
		replace c_pid_extreme = 2 if c_pid_long == 2 | c_pid_long == 4
		replace c_pid_extreme = 3 if c_pid_long == 1 | c_pid_long == 5
		
	global hetfx c_pid_extreme c_ideology_extreme c_attention 

	recode c_pid_long (1 = 5)(2 = 4)(3 = 3)(4 = 2)(5 = 1)
	recode c_ideology (1 = 7)(2 = 6)(3 = 5)(4 = 4)(5 = 3)(6 = 2)(7 = 1)

	cap drop c_ideology_extreme 
			gen c_ideology_extreme = 4 if c_ideology == 1 | c_ideology == 7
			replace c_ideology_extreme = 3 if c_ideology == 2 | c_ideology == 6
			replace c_ideology_extreme = 2 if c_ideology == 3 | c_ideology == 5
			replace c_ideology_extreme = 1 if c_ideology == 4
			
			
	replace c_ideology_extreme = . if wave == 3
	replace c_pid_extreme = . if wave == 3
	replace c_ce_index = . if wave == 3
	replace c_ee_index = . if wave == 3
	replace c_pid_long = . if wave == 3 
	replace c_ideology = . if wave == 3
	
	replace c_attention = . if wave == 3
	
	
	/* Regressions _____________________________________________________________*/
	
	global hetfx c_pid_extreme c_ideology_extreme c_attention 

	foreach hetfx of global hetfx {

		egen std_`hetfx' = std(`hetfx')
		
		** Partisan Attachment
		reg dv_coop treat_pt##c.std_`hetfx' treat_topic i.wave 
			matrix table = r(table)
			matrix list table 
		
		local i = `i' + 1
	}

	
	
	
/* _____________________________________________________________________________

	Table A17: Heterogeneous Effects By Content

________________________________________________________________________________*/	


	/* Import Data _____________________________________________________________*/

		use "$stata\ptinir_pooled.dta", clear	
		
		destring c_ideology, replace

	
	/* Regression Tables ___________________________________________________________*/

		** Set Treatment Vars 
		drop treat
		gen treat = treat_pt
		gen treat_topic = treat_t
			replace treat_topic = 0 if treat_topic == .

		/* Cleaning ________________________________________________________________*/

		gen c_pid_extreme = 1 if c_pid_long == 3
		replace c_pid_extreme = 2 if c_pid_long == 2 | c_pid_long == 4
		replace c_pid_extreme = 3 if c_pid_long == 1 | c_pid_long == 5

		recode c_pid_long (1 = 5)(2 = 4)(3 = 3)(4 = 2)(5 = 1)
		recode c_ideology (1 = 7)(2 = 6)(3 = 5)(4 = 4)(5 = 3)(6 = 2)(7 = 1)

		cap drop c_ideology_extreme 
				gen c_ideology_extreme = 4 if c_ideology == 1 | c_ideology == 7
				replace c_ideology_extreme = 3 if c_ideology == 2 | c_ideology == 6
				replace c_ideology_extreme = 2 if c_ideology == 3 | c_ideology == 5
				replace c_ideology_extreme = 1 if c_ideology == 4
				
				
		replace c_ideology_extreme = . if wave == 3
		replace c_pid_extreme = . if wave == 3
		replace c_ce_index = . if wave == 3
		replace c_ee_index = . if wave == 3
		replace c_pid_long = . if wave == 3 
		replace c_ideology = . if wave == 3
		replace c_attention = . if wave == 3
				
		local i = 1

		/* Regressions _____________________________________________________________*/
		
		global hetfx c_pid_long c_ideology c_fpmil_index c_fpcoop_index
		foreach hetfx of global hetfx {

			egen std_`hetfx' = std(`hetfx')
			
			** Partisan Attachment
			reg dv_coop treat_pt##c.std_`hetfx' treat_topic i.wave 
				matrix table = r(table)
				di "TABLE FOR HETFX by `hetfx'"
				matrix list table 
			
			local i = `i' + 1
		}
		
*log close
